﻿@model EquipManagement.Models.ApplicationRecord

@{
    ViewBag.Title = "申请仪器";
}

<h2>申请仪器</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>申请信息</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            <label for="EquipmentId" class="control-label col-md-2">申请仪器</label>
            <div class="col-md-10">
                @Html.DropDownList("EquipmentId", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.EquipmentId, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Applicant, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Applicant, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Applicant, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Contact, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Contact, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Contact, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.StudentInfo, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.StudentInfo, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.StudentInfo, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ApplicationDate, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <input name="ApplicationDate" value="@DateTime.Now.ToString("yyyy/MM/dd")" class="form-control" readonly="readonly" />
                @Html.ValidationMessageFor(model => model.ApplicationDate, "", new { @class = "text-danger" })
            </div>
        </div>


        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="提交" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @if (Request.UrlReferrer != null)
    {
        <a href="@Request.UrlReferrer">返回</a>
    }
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
